package com.lucanjun.cn.springboot.multipledatasources.business.model.entity.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author lucanjun
 * @version 1.0.0
 * @title PageDto
 * @create 2024-12-19 16:55:19
 * @description 基础表字段
 */
@Data
@Schema(name = "BaseEntity", description = "基础表字段")
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = 1338245238758581317L;

    @Schema(description = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}
